.TH swap(std::expected) 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
swap(std::expected) \- swap(std::expected)

.SH Synopsis
   friend constexpr void swap( expected& lhs, expected& rhs )             (since C++23)
   noexcept(/*see below*/);

   Overloads the std::swap algorithm for std::expected. Exchanges the state of lhs with
   that of rhs. Effectively calls lhs.swap(rhs).

   This overload participates in overload resolution only if lhs.swap(rhs) is valid.

   This function is not visible to ordinary unqualified or qualified lookup, and can
   only be found by argument-dependent lookup when std::expected<T, E> is an associated
   class of the arguments.

.SH Parameters

   lhs, rhs - expected objects whose states to swap

.SH Return value

   \fI(none)\fP

.SH Exceptions

   noexcept specification:
   noexcept(noexcept(lhs.swap(rhs)))

.SH Example

    This section is incomplete
    Reason: no example

.SH See also

   swap exchanges the contents
        \fI(public member function)\fP

.SH Categories:
     * conditionally noexcept
     * Todo no example
